package com.juzi.wopu.service.impl;

import java.util.List;

import com.juzi.wopu.domain.CanteenMenu;
import com.juzi.wopu.service.ICanteenMenuService;

public class CanteenMenuServiceImpl extends BaseServiceImpl<CanteenMenu> implements ICanteenMenuService{

	@Override
	public CanteenMenu findLast() {
		String hql="from CanteenMenu order by iId desc";
		List<CanteenMenu> list=BaseDao.findByhql(hql);
		if(list!=null && list.size()>0){
			return list.get(0);
		}
		return null;
	}

	@Override
	public CanteenMenu findById(Long id) {
		String hql="from CanteenMenu where iId="+id;
		List<CanteenMenu> list=BaseDao.findByhql(hql);
		if(list!=null && list.size()>0){
			return list.get(0);
		}
		return null;
	}

}






